<script type="text/javascript" src="md5.js"></script>
<script lang=javascript>
function antiBot()
{
    var maxNum = 9;  
    var minNum = 1;  
    var n1 = Math.floor(Math.random() * (maxNum - minNum + 1)) + minNum;  
    var n2 = Math.floor(Math.random() * (maxNum - minNum + 1)) + minNum;  
    var ans=prompt("What about " + n1 +" * " + n2 +" ?");
    if(ans != n1*n2) {
		alert("Wrong answer");
		window.open("index.php");
	}
	var hash = hex_md5(document.getElementById("passwd").value);
	document.getElementById("passwd").value = hash;
	//alert(document.getElementById("passwd").value);
}
</script>
<H1> Please Login </H1>
<form name="home" action="login.php">
ID: <input type="text" name="uname" size=30><BR>
Password: <input type="password" name="passwd" id="passwd" size=16><BR>
<input type=submit value="login" onclick="antiBot()">

</form>
